package fem2.material;

import inf.jlinalg.IMatrix;
import fem2.Element;
import fem2.MaterialModel;

/**
 * Abstract class for all type of material model which host another material
 * model
 * 
 * @author hbui
 * 
 */
public abstract class HostMaterialModel extends MaterialModel {

	private MaterialModel mm;

	public HostMaterialModel(MaterialModel mm) {
		super(mm);
		this.mm = mm;
	}

	/**
	 * get the hosted material model
	 * 
	 * @return
	 */
	public MaterialModel getMaterialModel() {
		return this.mm;
	}

	@Override
	public void Initialize(Element e) {
		mm.Initialize(e);
	}

	@Override
	public void InitializeSolutionStep(Element e) {
		mm.InitializeSolutionStep(e);
	}

	@Override
	public void InitalizeNonlinearIteration(Element e) {
		mm.InitalizeNonlinearIteration(e);
	}

	@Override
	public void FinalizeNonlinearIteration(Element e) {
		mm.FinalizeNonlinearIteration(e);
	}

	@Override
	public void FinalizeSolutionStep(Element e) {
		mm.FinalizeSolutionStep(e);
	}

	@Override
	public void CalculateOutputData(Element e) {
		mm.CalculateOutputData(e);
	}

	@Override
	public IMatrix getConstitutiveMatrix(Element e, int k) {
		return mm.getConstitutiveMatrix(e, k);
	}

}